<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- jsp文件头和头部 -->
    <%@ include file="../../system/index/top.jsp"%>
</head>
<body class="no-skin">

<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">

                        <!-- 检索  -->
                        <form action="admin/circleNoticeInfo/list" method="post" name="form" id="form">
                            <table>
                                <tr>
                                    <td style="padding-left:20px;text-align: right;padding-top: 5px;"><label>创建时间起：</label></td>
                                    <td style="text-align: left;padding-top: 5px;">
                                        <input id="startDate" name="startDate" type="text" value="${pd.startDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,maxDate:'#F{$dp.$D(\'endDate\')}'})" placeholder="请选择开始时间"/>
                                    </td>
                                    <td style="padding-left:20px;text-align: right;padding-top: 5px;"><label>创建时间止：</label></td>
                                    <td style="text-align: left;padding-top: 5px;">
                                        <input id="endDate" name="endDate"  type="text" value="${pd.endDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,minDate:'#F{$dp.$D(\'startDate\')}',startDate:'#F{$dp.$D(\'startDate\',{d:+1})}'})" placeholder="请选择结束时间"/>
                                    </td>
                                    <td style="padding-left:20px;text-align: right;padding-top: 5px;"><label>圈子ID：</label></td>
                                    <td style="text-align: left;padding-top: 5px;">
                                        <input class="nav-search-input" autocomplete="off" id="circleId" type="text" name="circleId" value="${pd.circleId}" placeholder="请输入圈子ID" />
                                    </td>
                                    <td style="padding-left:20px;text-align: right;padding-top: 5px;"><label>圈子名称：</label></td>
                                    <td style="text-align: left;padding-top: 5px;">
                                        <input class="nav-search-input" autocomplete="off" id="circleName" type="text" name="circleName" value="${pd.circleName}" placeholder="请输入圈子名称" />
                                    </td>
                                    <td style="padding-left:20px;text-align: right;padding-top: 5px;"><label>公告标题：</label></td>
                                    <td style="text-align: left;padding-top: 5px;">
                                        <input class="nav-search-input" autocomplete="off" id="noticeTitle" type="text" name="noticeTitle" value="${pd.noticeTitle}" placeholder="请输入公告标题" />
                                    </td>
                                    <c:if test="${QX.cha == 1}">
                                        <td style="padding-left:20px;padding-top: 5px;text-align: right;"><a class="btn btn-light btn-xs" onclick="searchs();" title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
                                    </c:if>
                                </tr>
                            </table>
                            <!-- 检索  -->

                            <table id="simple-table" class="table table-striped table-bordered table-hover"  style="margin-top:5px;">
                                <thead>
                                <tr>
                                    <th class="center" style="width:50px;">序号</th>
                                    <th class="center">创建时间</th>
                                    <th class="center">圈子ID</th>
                                    <th class="center">圈子名称</th>
                                    <th class="center">公告标题</th>
                                    <th class="center">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <!-- 开始循环 -->
                                <c:choose>
                                    <c:when test="${not empty list}">
                                        <c:if test="${QX.cha == 1}">
                                            <c:forEach items="${list}" var="circleNoticeInfo" varStatus="vs">
                                                <tr>
                                                    <td class='center' style="width: 30px;">${vs.index+1}</td>
                                                    <td class="center">${circleNoticeInfo.createTimeFormat}</td>
                                                    <td class="center">${circleNoticeInfo.circleId}</td>
                                                    <td class="center">${circleNoticeInfo.circleName}</td>
                                                    <td class="center">${circleNoticeInfo.noticeTitle}</td>
                                                    <td class="center">
                                                        <c:if test="${QX.cha != 1 && QX.cha != 1}">
                                                            <span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="ace-icon fa fa-lock" title="无权限"></i></span>
                                                        </c:if>
                                                        <div class="hidden-sm hidden-xs btn-group">
                                                            <c:if test="${QX.edit == 1}">
                                                                <a class="btn btn-xs btn-success" title="编辑" onclick="edit('${circleNoticeInfo.id}', '${page.currentPage}');">
                                                                    <i class="ace-icon fa fa-pencil-square-o bigger-120" title="编辑"></i>
                                                                </a>
                                                            </c:if>
                                                            <c:if test="${QX.del == 1 }">
                                                                <a class="btn btn-xs btn-danger" onclick="del('${circleNoticeInfo.id}', '${page.currentPage}');">
                                                                    <i class="ace-icon fa fa-trash-o bigger-120" title="删除"></i>
                                                                </a>
                                                            </c:if>
                                                            <c:if test="${QX.cha == 1}">
                                                                <a class="btn btn-xs btn-success" title="详情" onclick="detail('${circleNoticeInfo.id}');">
                                                                    详情
                                                                </a>
                                                            </c:if>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </c:forEach>
                                        </c:if>
                                        <c:if test="${QX.cha == 0 }">
                                            <tr>
                                                <td colspan="6" class="center">您无权查看</td>
                                            </tr>
                                        </c:if>
                                    </c:when>
                                    <c:otherwise>
                                        <tr class="main_info">
                                            <td colspan="6" class="center">没有相关数据</td>
                                        </tr>
                                    </c:otherwise>
                                </c:choose>
                                </tbody>
                            </table>

                            <div class="page-header position-relative">
                                <table style="width:100%;">
                                    <tr>
                                        <td style="vertical-align:top;">
                                            <c:if test="${QX.add == 1 }">
                                                <a class="btn btn-mini btn-success" onclick="add('${page.currentPage}');">新增</a>
                                            </c:if>
                                        </td>
                                        <td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
                                    </tr>
                                </table>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 返回顶部 -->
    <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
        <i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
    </a>

</div>
<!-- /.main-container -->

<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../../system/index/foot.jsp"%>
<!-- 删除时确认窗口 -->
<script src="static/ace/js/bootbox.js"></script>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!-- 日期框 -->
<script type="text/javascript" src="<%=basePath%>plugins/My97DatePicker_new/WdatePicker.js"></script>
<!-- 下拉框 -->
<script src="static/ace/js/chosen.jquery.js"></script>
<!--提示框-->
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
<script type="text/javascript" src="static/js/admin/circle/circleNoticeInfo/list.js"></script>
</body>
<script type="text/javascript">
    $(top.hangge());
    var path = "${pageContext.request.contextPath}";
</script>
</html>
